﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Linq.Expressions;

namespace BaMusaSoft.RPS.DataModel.Repositories
{
    /// <summary>
    /// Represent Outboxes Repostiory. Instantiate via UnitOfWork object
    /// </summary>
    public sealed class OutboxesRepository:RepositoryBase<Outbox>
    {
        internal OutboxesRepository(RpsEntities context) : base(context)
        {
        }

        #region Overrides of BaseRepository<Outbox>

        /// <summary>
        /// Adds the specified entity to the repository.
        /// </summary>
        /// <param name="entity">The entity.</param>
        public override void Add(Outbox entity)
        {
            throw new NotImplementedException();
        }

        /// <summary>
        /// Deletes the specified entity from the repository.
        /// </summary>
        /// <param name="entity">The entity.</param>
        public override void Delete(Outbox entity)
        {
            throw new NotImplementedException();
        }

        /// <summary>
        /// Gets the entity by id.
        /// </summary>
        /// <param name="id">The id.</param>
        /// <returns></returns>
        public override Outbox GetById(object id)
        {
            throw new NotImplementedException();
        }

        /// <summary>
        /// Query repository by specified filter.
        /// </summary>
        /// <param name="filter">The filter.</param>
        /// <returns></returns>
        public override IQueryable<Outbox> Query(Expression<Func<Outbox, bool>> filter)
        {
            throw new NotImplementedException();
        }

        /// <summary>
        /// Gets all entities in the repository.
        /// </summary>
        /// <returns></returns>
        public override IList<Outbox> GetAll()
        {
            throw new NotImplementedException();
        }

        public override void Refresh()
        {
            throw new NotImplementedException();
        }

        #endregion

        public string MaxOutbox
        {
            get
            {
                return
                    Context.Outboxes.Max(o => o.OutboxNo);
            }
        }
    }
}